<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .content {
      margin: 150px auto;
      width: 900px;
    }

  </style>
</head>
<body>
  <div id="app" class="content">
    <div id="example">
      <div v-bind:class="classObject">
        样式会变吗？
      </div>
      <div v-bind:style="{color: activeColor, fontSize: myFontSize + 'px'}">
        style测试
      </div>
      <div v-bind:style="styleObject">
        style测试2
      </div>
    </div> 
  </div>
  <script src="../js/lib/vue.js"></script>
  <script src="../js/lib/art-template.js"></script>
  <script src="../js/lib/jquery-2.1.1.js"></script>
  <script>   
    var data = {
      isActive: true,
      error: null,
      activeColor: 'red',
      myFontSize: 20,
      styleObject: {        
        color: 'red',
        fontSize: '25px'
      }
    }
          
    var app = new Vue({
      el: "#app",
      data: data,      
      computed: {
        classObject: function() {
          return {
            aaa: true,
            active: this.isActive && !this.error,
            'text-danger': this.error && this.error.type === 'fatal'
          };
        }
      }
    });
  </script>
</body>
</html>